import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false

import { Form,FormItem,Input,Button,Select,Option,Message,Container,
  Header,
  Aside,
  Main,
  Menu,
  MenuItem,
  Table,
  TableColumn,
  Drawer,
  DatePicker,
  Pagination,
  Link,
  Upload,
  Tabs,
  TabPane
} from 'element-ui'

Vue.use( Form );
Vue.use( FormItem );
Vue.use( Input );
Vue.use( Button );
Vue.use( Select );
Vue.use( Option );
Vue.use( Container );
Vue.use( Header );
Vue.use( Aside );
Vue.use( Main );
Vue.use( Menu );
Vue.use( MenuItem );
Vue.use( Table );
Vue.use( TableColumn );
Vue.use( Drawer );
Vue.use( DatePicker );
Vue.use( Pagination );
Vue.use( Link );
Vue.use( Upload );
Vue.use( Tabs );
Vue.use( TabPane );

Vue.prototype.$message = Message;

new Vue({
  router,
  store, //将store对象挂载到根实例上, 在所有组件中都可以通过 this.$store 获取store对象, 进而可以获取store对象身上 的 commit() dispatch()  getters , state
  
  render: h => h(App)
}).$mount('#app')
